package com.chen.demo.javase.juc;

import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;

/**
 * @author chenhongwei
 * @date 2020/2/21 21:11
 **/
public class LockDemo {
    private Lock lock = new ReentrantLock();

    private Integer count;

    private void increament() {
        lock.lock();
        try {
            count++;
        } finally {
            lock.unlock();
        }
    }

};
